import axios from "axios";
import config from "./config";

const instance = axios.create({
    timeout:config.timeout
})

// 设置响应拦截器，解包ajax返回的数据
instance.interceptors.response.use(res=>res.data,err=>Promise.reject(err))

export const get = (url,conf={}) => instance.get(url,conf)